## API Report File for "@backstage/plugin-permission-react"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { ApiRef } from '@backstage/core-plugin-api';
import { AuthorizePermissionRequest } from '@backstage/plugin-permission-common';
import { AuthorizePermissionResponse } from '@backstage/plugin-permission-common';
import { Config } from '@backstage/config';
import { DiscoveryApi } from '@backstage/core-plugin-api';
import { EvaluatePermissionRequest } from '@backstage/plugin-permission-common';
import { EvaluatePermissionResponse } from '@backstage/plugin-permission-common';
import { IdentityApi } from '@backstage/core-plugin-api';
import { Permission } from '@backstage/plugin-permission-common';
import { default as React_2 } from 'react';
import { ReactElement } from 'react';
import { ReactNode } from 'react';
import { ResourcePermission } from '@backstage/plugin-permission-common';

// @public (undocumented)
export type AsyncPermissionResult = {
  loading: boolean;
  allowed: boolean;
  error?: Error;
};

// @public
export class IdentityPermissionApi implements PermissionApi {
  // (undocumented)
  authorize(
    request: AuthorizePermissionRequest,
  ): Promise<AuthorizePermissionResponse>;
  // (undocumented)
  static create(options: {
    config: Config;
    discovery: DiscoveryApi;
    identity: IdentityApi;
  }): IdentityPermissionApi;
}

// @public
export type PermissionApi = {
  authorize(
    request: EvaluatePermissionRequest,
  ): Promise<EvaluatePermissionResponse>;
};

// @public
export const permissionApiRef: ApiRef<PermissionApi>;

// @public @deprecated
export const PermissionedRoute: (
  props: {
    caseSensitive?: boolean;
    children?: ReactNode;
    element?: ReactElement | null;
    path?: string;
    errorComponent?: ReactElement | null;
  } & (
    | {
        permission: Exclude<Permission, ResourcePermission>;
        resourceRef?: never;
      }
    | {
        permission: ResourcePermission;
        resourceRef: string | undefined;
      }
  ),
) => React_2.JSX.Element;

// @public
export function RequirePermission(
  props: RequirePermissionProps,
): JSX.Element | null;

// @public
export type RequirePermissionProps = (
  | {
      permission: Exclude<Permission, ResourcePermission>;
      resourceRef?: never;
    }
  | {
      permission: ResourcePermission;
      resourceRef: string | undefined;
    }
) & {
  errorPage?: ReactNode;
  children: ReactNode;
};

// @public
export function usePermission(
  input:
    | {
        permission: Exclude<Permission, ResourcePermission>;
        resourceRef?: never;
      }
    | {
        permission: ResourcePermission;
        resourceRef: string | undefined;
      },
): AsyncPermissionResult;

// (No @packageDocumentation comment for this package)
```
